home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / medmfc.zip / MAKEFILE < prev    next >
Text File  |  1994-06-23  |  4KB  |  158 lines

  1.  
  2. # This is a part of the Microsoft Foundation Classes C++ library.
  3. # Copyright (C) 1992 Microsoft Corporation
  4. # All rights reserved.
  5. #
  6. # This source code is only intended as a supplement to the
  7. # Microsoft Foundation Classes Reference and Microsoft
  8. # QuickHelp and/or WinHelp documentation provided with the library.
  9. # See these sources for detailed information regarding the
  10. # Microsoft Foundation Classes product.
  11.  
  12. # Common include for building MFC Sample programs
  13. #
  14. #  typical usage
  15. #       PROJ = foo
  16. #       OBJS = foo.obj bar.obj ...
  17. #       !INCLUDE ..\SAMPLE_.MAK
  18. #
  19. # NOTE: do not include 'stdafx.obj' in the OBJS list - the correctly
  20. #    built version will be included for you
  21. #
  22. # Options to NMAKE:
  23. #     "AFXDLL=1" => build a DLL client app (default static MFC library)
  24. #     "DEBUG=0" => use retail (default debug)
  25. #     "OPT" => use to set custom compile options
  26. #     "BROWSE=1" => build Visual C++ compatible browse file (.BSC file)
  27.  
  28. PROJ = MULTIPAD
  29. OBJS = $(PROJ).obj magmaed.obj mainfrm.obj docview.obj
  30.  
  31. !ifndef PROJ
  32.     !ERROR You forgot to define 'PROJ' !!
  33. !endif
  34. !ifndef OBJS
  35.     !ERROR You forgot to define 'OBJS' !!
  36. !endif
  37.  
  38. !if "$(DEBUG)"!="0"
  39. DEBUGSUF=D
  40. !endif
  41.  
  42. !if "$(AFXDLL)"!="1"
  43. # static link library variant [medium model] - the default
  44. STDAFX=stdafx
  45. CPPMAIN_FLAGS=/AM /Zp /GA /G2 /Gyf /Ig:\mewin
  46. LIBS=mlibcew
  47. AFXLIB=mafxcw$(DEBUGSUF)
  48. !else
  49. # dynamic link library variant [large model]
  50. STDAFX=stdafxe
  51. CPPMAIN_FLAGS=/AL /Zp /GA /GEf /GEs /Gs /G2 /Gyf /D_AFXDLL /Ig:\mewin
  52. RCFLAGS=$(RCFLAGS) /D_AFXDLL
  53. LIBS=llibcew
  54. AFXLIB=mfc250$(DEBUGSUF)
  55. !ifdef USES_OLE
  56. AFXLIB=$(AFXLIB) mfco250$(DEBUGSUF)
  57. !endif
  58. !ifdef USES_DB
  59. AFXLIB=$(AFXLIB) mfcd250$(DEBUGSUF)
  60. !endif
  61. !endif #//AFXDLL
  62.  
  63. !ifdef USES_VBX
  64. # special settings for VBX enabled apps
  65. STACK=/STACK:20480
  66. !else
  67. STACK=/STACK:10240
  68. !endif
  69.  
  70. !ifdef USES_OLE
  71. # special settings for OLE enabled apps
  72. WIN31ONLY=1
  73. STACK=/STACK:12288
  74. LIBS=$(LIBS) mfcoleui compobj storage ole2 ole2disp
  75. !endif
  76.  
  77. !ifdef USES_DB
  78. LIBS=$(LIBS) odbc
  79. !endif
  80.  
  81. !if "$(DEBUG)"!="0"
  82. # debug variant - the default
  83. CPPMAIN_FLAGS=/D_DEBUG $(CPPMAIN_FLAGS) /Od /Z7
  84. LINKFLAGS=/NOD /ONERR:NOEXE $(STACK) /CODEVIEW
  85. STDAFX=$(STDAFX)d
  86. !else
  87. # retail variant
  88. CPPMAIN_FLAGS=$(CPPMAIN_FLAGS) /O1
  89. LINKFLAGS=/AL:16 /NOD /ONERR:NOEXE $(STACK)
  90. !endif #//DEBUG
  91.  
  92. !if "$(OPT)"!=""
  93. CPPMAIN_FLAGS=$(CPPMAIN_FLAGS) $(OPT)
  94. !endif
  95.  
  96. LIBS=$(AFXLIB) $(LIBS) libw commdlg shell $(EXTRA_LIBS)
  97. CPPFLAGS=$(CPPMAIN_FLAGS) /W3 /Yustdafx.h /Fp..\$(STDAFX).pch $(EXTRA_FLAGS)
  98.  
  99. !if "$(BROWSE)"=="1"
  100. CPPFLAGS=$(CPPFLAGS) /FR
  101. SBRS=$(OBJS:.obj=.sbr)
  102. all: $(PROJ).exe $(PROJ).bsc
  103. !endif
  104.  
  105. #############################################################################
  106.  
  107. $(PROJ).exe: ..\$(STDAFX).obj $(PROJ).res $(PROJ).def $(OBJS)
  108.     link $(LINKFLAGS) @<<
  109. $(OBJS) ..\$(STDAFX).obj,
  110. $(PROJ),NUL,$(LIBS),$(PROJ).def;
  111. <<
  112.     rc /31 /k /t $(PROJ).res
  113.  
  114. $(OBJS): ..\$(STDAFX).pch
  115.  
  116. $(PROJ).res:  resource.h
  117.     rc /r /z $(RCFLAGS) $(PROJ).rc
  118.  
  119. $(PROJ).bsc: $(SBRS) ..\$(STDAFX).sbr
  120.     bscmake @<<
  121. /o$@ $(SBRS) ..\$(STDAFX).sbr
  122. <<
  123.  
  124. clean::
  125.     -erase $(PROJ).exe
  126.     -erase $(PROJ).res
  127.     -erase $(PROJ).bsc
  128.     -erase *.aps
  129.     -erase *.pdb
  130.     -erase *.pch
  131.     -erase *.map
  132.     -erase *.obj
  133.     -erase *.sbr
  134.  
  135. #############################################################################
  136. # Shared PCH and PCT files (shared by all samples)
  137.  
  138. ..\$(STDAFX).obj ..\$(STDAFX).pch ..\$(STDAFX).sbr:: ..\stdafx.h ..\stdafx.cpp
  139.     @echo.
  140.     @echo Building shared Pre-Compiled Header/Type files.
  141.     @echo.
  142. !if "$(BROWSE)"=="1"
  143.     $(CPP) @<<
  144. $(CPPMAIN_FLAGS) /W4 /Ycstdafx.h /FR..\$(STDAFX).sbr /Fp..\$(STDAFX).pch /Fo..\$(STDAFX).obj /c ..\stdafx.cpp
  145. <<
  146. !else
  147.     $(CPP) @<<
  148. $(CPPMAIN_FLAGS) /W4 /Ycstdafx.h /Fp..\$(STDAFX).pch /Fo..\$(STDAFX).obj /c ..\stdafx.cpp
  149. <<
  150. !endif
  151.  
  152. cleanall: clean
  153.     -erase ..\$(STDAFX).pch
  154.     -erase ..\$(STDAFX).obj
  155.     -erase ..\$(STDAFX).sbr
  156.  
  157. #############################################################################
  158.